import requests

def get_login():
    url = 'https://gateway.bilinl.com/uaa/login/acct'
    headers = {
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36'
    }
    data = {
        'clientId': '83YslrcMpBt3X3c0eK8jvhdPAW84ScHc',
        'clientSecret': 'rosJtPuAMy69wnEMiw9UqRaQNELypEyk',
        'username': 'datacenter',
        'password': '.datacenter.jf',
        'phoneLogin': '0'
    }
    res = requests.post(url,headers=headers,data=data)
    print(res.text)

def get_data():
    url = 'https://gateway.bilinl.com/kfweb/Chat/GetUserListByType'
    headers = {
        'authorization': 'Bearer 4e185040-4468-47e5-a5e9-840018c3367b',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36',
        'content-type': 'application/json'
    }
    data ='{"nType":10,"nPageIndex":1,"nPageSize":10,"nState":10,"dtStartTime":"2021-07-29","dtEndTime":"2021-07-29","vcSearchKey":"","vcSearchType":0,"nOverParentId":0,"nOverChildId":0}'
    res = requests.post(url,headers=headers,data=data)
    print(res.text)

if __name__ == "__main__":
    # get_login()
    get_data()